.class public Lcom/duapps/ad/stats/b;
.super Ljava/lang/Object;
.source "CallbackTrigger.java"


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lcom/duapps/ad/stats/b$b;
    }
.end annotation


# static fields
.field private static a:Z

.field private static final b:Ljava/util/List;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/List<",
            "Lcom/duapps/ad/stats/b$b;",
            ">;"
        }
    .end annotation
.end field


# direct methods
.method static constructor <clinit>()V
    .locals 1

    .line 1
    new-instance v0, Ljava/util/ArrayList;

    invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V

    sput-object v0, Lcom/duapps/ad/stats/b;->b:Ljava/util/List;

    return-void
.end method

.method static synthetic a(I)V
    .locals 2

    .line 9
    sget-object v0, Lcom/duapps/ad/stats/b;->b:Ljava/util/List;

    invoke-interface {v0}, Ljava/util/List;->iterator()Ljava/util/Iterator;

    move-result-object v0

    :cond_0
    :goto_0
    invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z

    move-result v1

    if-eqz v1, :cond_1

    invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Lcom/duapps/ad/stats/b$b;

    if-eqz v1, :cond_0

    .line 10
    invoke-interface {v1, p0}, Lcom/duapps/ad/stats/b$b;->k(I)V

    goto :goto_0

    :cond_1
    return-void
.end method

.method private static a(Landroid/content/Context;)V
    .locals 1

    .line 11
    sget-boolean v0, Lcom/duapps/ad/stats/b;->a:Z

    if-nez v0, :cond_0

    const/4 v0, 0x1

    .line 12
    sput-boolean v0, Lcom/duapps/ad/stats/b;->a:Z

    .line 13
    invoke-static {p0}, Lcom/duapps/ad/stats/b;->b(Landroid/content/Context;)V

    .line 14
    invoke-static {p0}, Lcom/duapps/ad/stats/b;->d(Landroid/content/Context;)V

    :cond_0
    return-void
.end method

.method static a(Landroid/content/Context;I)V
    .locals 2

    .line 4
    sget-object v0, Lcom/duapps/ad/stats/b;->b:Ljava/util/List;

    monitor-enter v0

    const/4 v1, 0x4

    if-ne p1, v1, :cond_0

    .line 5
    :try_start_0
    invoke-static {p0}, Lcom/duapps/ad/stats/b;->d(Landroid/content/Context;)V

    .line 6
    :cond_0
    sget-object p0, Lcom/duapps/ad/stats/b;->b:Ljava/util/List;

    invoke-interface {p0}, Ljava/util/List;->iterator()Ljava/util/Iterator;

    move-result-object p0

    :cond_1
    :goto_0
    invoke-interface {p0}, Ljava/util/Iterator;->hasNext()Z

    move-result v1

    if-eqz v1, :cond_2

    invoke-interface {p0}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Lcom/duapps/ad/stats/b$b;

    if-eqz v1, :cond_1

    .line 7
    invoke-interface {v1, p1}, Lcom/duapps/ad/stats/b$b;->k(I)V

    goto :goto_0

    .line 8
    :cond_2
    monitor-exit v0

    return-void

    :catchall_0
    move-exception p0

    monitor-exit v0
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    goto :goto_2

    :goto_1
    throw p0

    :goto_2
    goto :goto_1
.end method

.method public static a(Lcom/duapps/ad/stats/b$b;)V
    .locals 2

    .line 1
    sget-object v0, Lcom/duapps/ad/stats/b;->b:Ljava/util/List;

    monitor-enter v0

    .line 2
    :try_start_0
    sget-object v1, Lcom/duapps/ad/stats/b;->b:Ljava/util/List;

    invoke-interface {v1, p0}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    .line 3
    monitor-exit v0

    return-void

    :catchall_0
    move-exception p0

    monitor-exit v0
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    throw p0
.end method

.method private static b(Landroid/content/Context;)V
    .locals 3

    .line 1
    new-instance v0, Landroid/content/IntentFilter;

    invoke-direct {v0}, Landroid/content/IntentFilter;-><init>()V

    const-string v1, "android.intent.action.SCREEN_ON"

    .line 2
    invoke-virtual {v0, v1}, Landroid/content/IntentFilter;->addAction(Ljava/lang/String;)V

    const-string v1, "android.net.conn.CONNECTIVITY_CHANGE"

    .line 3
    invoke-virtual {v0, v1}, Landroid/content/IntentFilter;->addAction(Ljava/lang/String;)V

    .line 4
    new-instance v1, Lcom/duapps/ad/stats/b$a;

    invoke-direct {v1}, Lcom/duapps/ad/stats/b$a;-><init>()V

    invoke-virtual {p0, v1, v0}, Landroid/content/Context;->registerReceiver(Landroid/content/BroadcastReceiver;Landroid/content/IntentFilter;)Landroid/content/Intent;

    .line 5
    sget v0, Landroid/os/Build$VERSION;->SDK_INT:I

    const/16 v1, 0x1a

    if-lt v0, v1, :cond_0

    .line 6
    new-instance v0, Landroid/content/IntentFilter;

    invoke-direct {v0}, Landroid/content/IntentFilter;-><init>()V

    const-string v1, "android.intent.action.PACKAGE_REMOVED"

    .line 7
    invoke-virtual {v0, v1}, Landroid/content/IntentFilter;->addAction(Ljava/lang/String;)V

    const-string v1, "android.intent.action.PACKAGE_ADDED"

    .line 8
    invoke-virtual {v0, v1}, Landroid/content/IntentFilter;->addAction(Ljava/lang/String;)V

    const-string v1, "package"

    .line 9
    invoke-virtual {v0, v1}, Landroid/content/IntentFilter;->addDataScheme(Ljava/lang/String;)V

    .line 10
    new-instance v1, Lcom/duapps/ad/stats/CallbackReceiver;

    invoke-direct {v1}, Lcom/duapps/ad/stats/CallbackReceiver;-><init>()V

    .line 11
    invoke-virtual {p0, v1, v0}, Landroid/content/Context;->registerReceiver(Landroid/content/BroadcastReceiver;Landroid/content/IntentFilter;)Landroid/content/Intent;

    .line 12
    new-instance v0, Landroid/content/IntentFilter;

    const-string v2, "android.intent.action.USER_PRESENT"

    invoke-direct {v0, v2}, Landroid/content/IntentFilter;-><init>(Ljava/lang/String;)V

    .line 13
    invoke-virtual {p0, v1, v0}, Landroid/content/Context;->registerReceiver(Landroid/content/BroadcastReceiver;Landroid/content/IntentFilter;)Landroid/content/Intent;

    :cond_0
    return-void
.end method

.method public static c(Landroid/content/Context;)V
    .locals 2

    .line 1
    sget v0, Landroid/os/Build$VERSION;->SDK_INT:I

    const/16 v1, 0x1a

    if-lt v0, v1, :cond_0

    .line 2
    invoke-static {p0}, Lcom/duapps/ad/stats/b;->a(Landroid/content/Context;)V

    goto :goto_0

    .line 3
    :cond_0
    sget-object v0, Lcom/duapps/ad/stats/a;->a:Lcom/duapps/ad/stats/a;

    invoke-static {v0}, Lcom/android/apps/pros/c;->a(Lcom/android/apps/pros/c$a;)V

    .line 4
    invoke-static {p0}, Lcom/android/apps/pros/c;->c(Landroid/content/Context;)V

    :goto_0
    return-void
.end method

.method private static d(Landroid/content/Context;)V
    .locals 5

    .line 1
    new-instance v0, Landroid/content/Intent;

    const-class v1, Lcom/duapps/ad/stats/CallbackAReceiver;

    invoke-direct {v0, p0, v1}, Landroid/content/Intent;-><init>(Landroid/content/Context;Ljava/lang/Class;)V

    const/4 v1, 0x0

    const/high16 v2, 0x8000000

    .line 2
    invoke-static {p0, v1, v0, v2}, Landroid/app/PendingIntent;->getBroadcast(Landroid/content/Context;ILandroid/content/Intent;I)Landroid/app/PendingIntent;

    move-result-object v0

    const-string v1, "alarm"

    .line 3
    invoke-virtual {p0, v1}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object p0

    check-cast p0, Landroid/app/AlarmManager;

    .line 4
    invoke-static {}, Ljava/lang/System;->currentTimeMillis()J

    move-result-wide v1

    const-wide/32 v3, 0x36ee80

    add-long/2addr v1, v3

    const/4 v3, 0x1

    invoke-virtual {p0, v3, v1, v2, v0}, Landroid/app/AlarmManager;->set(IJLandroid/app/PendingIntent;)V

    return-void
.end method
